home *** CD-ROM | disk | FTP | other *** search
Gui4CLI script | 1999-11-24 | 3.3 KB | 118 lines |
- G4C
-
-
- WINBIG 61 11 505 163 "Players Configuration"
- wintype 11110001
- resinfo 8 640 256
-
- BOX 0 0 0 0 out button
-
- xonload
- gosub Config.gc loadprefs
- guiopen Config.gc
-
- xonclose
- ifexists file env:.dir.prefs
- delete env:.dir.prefs
- endif
- guiquit Config.gc
-
- ; -------------- the listview
-
- XLISTVIEW 6 4 493 124 "" cfg_lvline "" 0 txt
- gadid 1
- gadfont topaz.font 8 000
- cgf_lvnum = $$LV.LINE
- cutvar cfg_lvline cut word 1 cfg_var ; get variable name
- cutvar cfg_lvline cut word 1 "" ; cut off the = character
- extract cfg_lvline unquote cfg_prog ; clean-up program name
- update Config.gc 2 $cfg_prog
- setgad Config.gc 2 on
-
- ; -------------- The buttons
-
- XBUTTON 10 145 100 14 "Save"
- gosub Config.gc saveprefs
- guiquit Config.gc
-
-
- XBUTTON 115 145 100 14 "Use"
- guiquit Config.gc
-
-
- XBUTTON 455 145 20 14 "<"
- lvuse Config.gc 1
- lvmove -5
-
-
- XBUTTON 475 145 20 14 ">"
- lvuse Config.gc 1
- lvmove 5
-
-
- XTEXTIN 10 130 486 14 "" cfg_prog "" 512
- gadid 2
- gosub Config.gc updatelist
-
-
- XBUTTON 365 145 87 14 "Browse"
- reqfile -1 -1 300 -40 "Select File..." load cfg_prog SYS:
- update Config.gc 2 $cfg_prog
- setgad Config.gc 2 on
- gosub Config.gc updatelist
-
-
- ; -------------- Routines
-
- xroutine loadprefs
- setvar .dir.prefs ""
- gosub Config.gc addprefs
- lvuse Config.gc 1
- lvchange env:.dir.prefs
-
- xroutine saveprefs
- setvar .dir.prefs "G4C - Players\n\nxOnLoad\n"
- gosub Config.gc addprefs
- append env:.dir.prefs "GuiQuit Players\n"
- copy env:.dir.prefs guis:tools/prefs/players
-
- xroutine addprefs
- append env:.dir.prefs '*DEF.EDITOR = \"$*DEF.EDITOR\"\n'
- append env:.dir.prefs '*DEF.GUIDE = \"$*DEF.GUIDE\"\n'
- append env:.dir.prefs '*DEF.HTML = \"$*DEF.HTML\"\n'
- append env:.dir.prefs '*DEF.PAINT = \"$*DEF.PAINT\"\n'
- append env:.dir.prefs '*DEF.GFXCON = \"$*DEF.GFXCON\"\n'
- append env:.dir.prefs '*DEF.GFXED = \"$*DEF.GFXED\"\n'
- append env:.dir.prefs '*DEF.GFX = \"$*DEF.GFX\"\n'
- append env:.dir.prefs '*DEF.ILBM = \"$*DEF.ILBM\"\n'
- append env:.dir.prefs '*DEF.PPM = \"$*DEF.PPM\"\n'
- append env:.dir.prefs '*DEF.TGA = \"$*DEF.TGA\"\n'
- append env:.dir.prefs '*DEF.PNG = \"$*DEF.PNG\"\n'
- append env:.dir.prefs '*DEF.GIF = \"$*DEF.GIF\"\n'
- append env:.dir.prefs '*DEF.JPG = \"$*DEF.JPG\"\n'
- append env:.dir.prefs '*DEF.ANIM = \"$*DEF.ANIM\"\n'
- append env:.dir.prefs '*DEF.FLC = \"$*DEF.FLC\"\n'
- append env:.dir.prefs '*DEF.QT = \"$*DEF.QT\"\n'
- append env:.dir.prefs '*DEF.AVI = \"$*DEF.AVI\"\n'
- append env:.dir.prefs '*DEF.MPG = \"$*DEF.MPG\"\n'
- ; append env:.dir.prefs '*DEF.8SVX = \"$*DEF.8SVX\"\n' ; discontinued ?
- append env:.dir.prefs '*DEF.SMPL = \"$*DEF.SMPL\"\n'
- append env:.dir.prefs '*DEF.MOD = \"$*DEF.MOD\"\n'
- append env:.dir.prefs '*DEF.MPGA = \"$*DEF.MPGA\"\n'
- append env:.dir.prefs '*DEF.LHA = \"$*DEF.LHA\"\n'
- append env:.dir.prefs '*DEF.ZIP = \"$*DEF.ZIP\"\n'
- append env:.dir.prefs '*DEF.UNZIP = \"$*DEF.UNZIP\"\n'
- append env:.dir.prefs '*DEF.HEX = \"$*DEF.HEX\"\n'
- append env:.dir.prefs '*DEF.PP = \"$*DEF.PP\"\n'
- append env:.dir.prefs '*DEF.FONT = \"$*DEF.FONT\"\n'
- append env:.dir.prefs '*DEF.DT = \"$*DEF.DT\"\n'
-
- xroutine updatelist
- setvar $cfg_var '$cfg_prog'
- setvar .dir.prefs ""
- gosub Config.gc addprefs
- lvuse Config.gc 1
- lvchange env:.dir.prefs
-
-
-